<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>DN_EDITCHANGE</title>
<meta http-equiv="Content-Type" Content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../../styles/styles.css">
<script language="javascript" src='../../links.js' type="text/javascript"></script>
</head>
<body>

<h1>DN_EDITCHANGE</h1>
<div class=navbar>
<a  href="index_dn.html">Events</a> |
<a href="../index.html">Dialog API</a><br>
</div>

<div class=shortdescr>
The <dfn>DN_EDITCHANGE</dfn> event is sent to the dialog callback function when an edit item has
changed (for example, a character has been entered).
</div>

<h3>Param1</h3>
<div class=descr>
The ID of the dialog item that has changed.
</div>

<h3>Param2</h3>
<div class=descr>
Pointer to the <a href="../structures/fardialogitem.html">FarDialogItem</a>
structure for the item that has changed.
</div>

<h3>Return</h3>
<div class=descr>
In Dialog API 1.0, the return value is ignored, but to ensure compatibility with future versions of
Dialog API, it is recommended to return:
<ul>
<li>TRUE  - to confirm the changes
<li>FALSE - to cancel the changes
</ul>
</div>

<h3>Controls</h3>
<div class=descr>
<table class="cont">
<tr class="cont"><th class="cont" width="40%">Control</th><th class="cont" width="60%">Description</th></tr>
<tr class="cont"><td class="cont" width="40%"><a href="../controls/di_combobox.html">DI_COMBOBOX</a></td>
<td class="cont" width="60%">Combined list</td></tr>
<tr class="cont"><td class="cont" width="40%"><a href="../controls/di_edit.html">DI_EDIT</a></td>
<td class="cont" width="60%">Text input line</td></tr>
<tr class="cont"><td class="cont" width="40%"><a href="../controls/di_fixedit.html">DI_FIXEDIT</a></td>
<td class="cont" width="60%">Fixed size text input line</td></tr>
<tr class="cont"><td class="cont" width="40%"><a href="../controls/di_pswedit.html">DI_PSWEDIT</a></td>
<td class="cont" width="60%">Password input line</td></tr>
</table>
</div>

<h3>Remarks</h3>
<div class=descr>
<ol>
<li>The ability to change the state of the dialog item by changing the elements of the
<a href="../structures/fardialogitem.html">FarDialogItem</a> structure is missing
in Dialog API 1.0.
<li>The <dfn>DN_EDITCHANGE</dfn> event will not be sent in a response to the following messages:
<a href="dm_settextptr.html">DM_SETTEXTPTR</a> and
<a href="dm_settext.html">DM_SETTEXT</a>.
</ol>
</div>

<h3>Example</h3>
<div class=descr>
<pre class=code>
...
// show a copy of the entered data only for numbers
if (Msg == DN_EDITCHANGE &amp;&amp; Param1 == 2)
{
  FarDialogItem *Item=(FarDialogItem *)Param2;
  int Len=strlen(Item-&gt;Data);
  for(int I=0; I &lt; Len; ++I)
    if(!isdigit(Item-&gt;Data[I]))
      break;
  if(I == Len)
    return FALSE;
  Info.SendDlgMessage(hDlg, DM_SETTEXTPTR, 3, (LONG_PTR)Item-&gt;Data);
  return TRUE;
}
...
</pre>
</div>


<div class=see>See also:</div><div class=seecont>
<a href="../dialogex.html">DialogEx</a><br>

</div>

</body>
</html>
